<template>
  <el-card>
    publish
    <el-form>
      <el-form-item>
        <el-button @click="previous($parent)">上一步</el-button>
        <el-button
          :disabled="publishBtnDisabled"
          type="primary"
          @click="next($parent)"
          >最终发布</el-button
        >
      </el-form-item>
    </el-form>
  </el-card>
</template>
<script setup lang="ts">
import { ref } from 'vue'

const publishBtnDisabled = ref<boolean>(false)

//上一步
const previous = ($parent: any) => {
  $parent.$parent.active = 1
}

//下一步
const next = ($parent: any) => {
  publishBtnDisabled.value = true
  $parent.$parent.active = 3
}
</script>

<style scoped></style>
